package com.csd.action.manager;

import com.csd.helper.ActionResult;
import com.csd.serviceImpl.ProjectService;

/**
 * 
 * 分配老师评审的Action类
 * @author 何文森
 * @version 1.0
 * 
 * <br> 修订时间：2009-12-17
 * <br> 修改原因：创建文件
 * <br> 修改人： 何文森
 * 
 * <br> 
 * 
 */
public class AssignedTeacherSubmitAction {
	//项目服务类
	private ProjectService projectService;

	private Integer projectID;
	
	private String state;
	//传回给页面的参数
	private String stage;
	
	public String getStage() {
		return stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public Integer getProjectID() {
		return projectID;
	}

	public void setProjectID(Integer projectID) {
		this.projectID = projectID;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public ProjectService getProjectService() {
		return projectService;
	}

	public void setProjectService(ProjectService projectService) {
		this.projectService = projectService;
	}
	
	public String execute(){
		String result = ActionResult.fail;
		
		//获得项目所处阶段,并进行修改
		this.stage = projectService.changeToNextState(this.projectID);
		if(this.stage != null)
		{
			result = ActionResult.success;
		}
		
		return result;
	}
}

